<template>
  <div class="more-container">
    <el-tabs v-model="activeName" @tab-click="handleClick" class="tabcontent">
      <el-tab-pane :label="item.title" :name="item.name" v-for="item in groupByList" :key="item.name">
        <dateStatistics v-if="activeName == item.name" :groupBy='item.name'></dateStatistics>
      </el-tab-pane>

    </el-tabs>
  </div>
</template>
<script>
import dateStatistics from './component/dateStatistics'

export default {
  components: {
    dateStatistics,
  },
  data() {
    
    return {
      activeName: 'date',
      groupByList:[
        {title:'日期统计',name:'date'},
        {title:'来源机构',name:'team'},
        {title:'所属机构',name:'branch'},
        {title:'招生渠道',name:'channel'},
        {title:'班型统计',name:'package'},
      ]
    }
  },

  methods: {
    handleClick(tab, event) {
      this.activeName = tab.name
    },
 
  },
  mounted(){
   
  }
}
</script>

<style scoped lang='scss'>
::v-deep {
  .el-tabs__nav-wrap::after {
    height: 1px;
  }

  .el-tabs__item {
    font-size: 16px;
  }

  .el-tabs__item.is-active {
    font-weight: bold;
  }
}
</style>